package fun.coding.topcoder.singleround;

import java.util.HashSet;

public class MagicalStringDiv2 {

    /**
     * a string is magical if >>><<< same number
     * >>><>< 2
     * >>>><<<< 0
     * <<>> 4
     * return the minimum number of moves to change a string into magic string.
     */
    public static void main(String[] args) {
        

    }

    public int minimalMoves(String s) {
        int move = 0;
        for (int i = 0; i < s.length(); ++i) {
            if (i < s.length() / 2 && s.charAt(i) != '>')
                move++;
            
            if (i >= s.length() / 2 && s.charAt(i) != '<')
                move++;
            
        }
        
        int[] n = new int[5];
        HashSet<Integer> set = new HashSet<Integer>();
        
        for (int nn : set) {
            int m = findMax(set);
        }
        
        
        
        
        
        return move;
    }
    
    private int findMax(HashSet<Integer> h) {
        
        return -1;
    }
}
